package org.arclib.x.gui.themes;

import org.arclib.draw.Color;
import org.arclib.draw.Draw;
import org.arclib.math.Point;
import org.arclib.math.Size;
import org.arclib.x.gui.widgets.ActionType;

public class WarCoders extends Theme
{
	public WarCoders()
	{
		setThemeName("WarCoders");
	}

	// / Draw button FreeUniverse Style
	public void drawButton(ActionType type, boolean focus, Point pos,
			Size size, Color color)
	{
		drawBorder(type, focus, pos, size, color);
	}

	// / Draw label FreeUniverse Style
	public void drawLabel(ActionType type, boolean focus, Point pos, Size size,
			Color color)
	{
		drawBorder(type, focus, pos, size, color);
	}

	// / Draw textfield FreeUniverse Style
	public void drawTextField(ActionType type, boolean focus, Point pos,
			Size size, Color color)
	{
		drawBorder(type, focus, pos, size, color);
	}

	// / draw a nice rectangle border
	private void drawBorder(ActionType type, boolean focus, Point pos,
			Size size, Color color)
	{
		int detail = 6;

		Color d = new Color(5, 73, 144, 220);
		Color mo = new Color(5, 73, 144 - 30, 180);

		switch (type)
		{
			case DEFAULT:
				Draw.roundEdgeRect(pos, size, detail, d, true);
				break;

			case MOUSEOVER:
				Draw.roundEdgeRect(pos, size, detail, mo, true);
				break;

			case CLICKON:
				Draw.roundEdgeRect(pos, size, detail, mo, true);
				break;

			case CLICKOFF:
				Draw.roundEdgeRect(pos, size, detail, mo, true);
				break;
		}
	}
}
